<%@ page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@taglib prefix="bean" uri="http://struts.apache.org/tags-bean"%>
<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic" %>

<logic:equal name="user" property="admin" value="false" scope="session">
	<logic:equal name="user" property="admin" value="true" scope="session">
		<logic:redirect href="profile.jsp"></logic:redirect>
	</logic:equal>
	<h2><bean:message key="common.hello"/>, ${user.name} ${user.surname}</h2>
</logic:equal>

<logic:equal name="user" property="admin" value="true" scope="session">
   	<logic:equal name="user" property="admin" value="false" scope="session">
   		<logic:redirect href="profile.jsp"></logic:redirect>
  	</logic:equal>
 	<h2><bean:message key="common.hello"/>, ${user.name} ${user.surname}</h2>
</logic:equal>

<html:messages id="msg" message="true" property="addRequest_success">
	<div class="alert alert-success">
		<bean:write name="msg"/>
	</div>
</html:messages>
<html:messages id="msg" message="true" property="request_id">
	<div class="alert alert-success">
		<bean:write name="msg"/>
	</div>
</html:messages>
<html:messages id="msg" message="true" property="changePassword_success">
	<div class="alert alert-success">
		<bean:write name="msg"/>
	</div>
</html:messages>